home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / intuition / getscreendata.c < prev    next >
C/C++ Source or Header  |  1996-11-08  |  2KB  |  94 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: getscreendata.c,v 1.3 1996/11/08 11:28:02 aros Exp $
  4.     $Log: getscreendata.c,v $
  5.     Revision 1.3  1996/11/08 11:28:02  aros
  6.     All OS function use now Amiga types
  7.  
  8.     Moved intuition-driver protos to intuition_intern.h
  9.  
  10.     Revision 1.2  1996/10/24 15:51:20  aros
  11.     Use the official AROS macros over the __AROS versions.
  12.  
  13.     Revision 1.1  1996/10/21 17:06:49  aros
  14.     A couple of new functions
  15.  
  16.  
  17.     Desc:
  18.     Lang: english
  19. */
  20. #include "intuition_intern.h"
  21. #include <string.h>
  22. #include <clib/exec_protos.h>
  23.  
  24. /*****************************************************************************
  25.  
  26.     NAME */
  27.     #include <intuition/screens.h>
  28.     #include <clib/intuition_protos.h>
  29.  
  30.     AROS_LH4(LONG, GetScreenData,
  31.  
  32. /*  SYNOPSIS */
  33.     AROS_LHA(APTR           , buffer, A0),
  34.     AROS_LHA(ULONG          , size, D0),
  35.     AROS_LHA(ULONG          , type, D1),
  36.     AROS_LHA(struct Screen *, screen, A1),
  37.  
  38. /*  LOCATION */
  39.     struct IntuitionBase *, IntuitionBase, 71, Intuition)
  40.  
  41. /*  FUNCTION
  42.     Copy part or all infos about a screen into a private buffer.
  43.  
  44.     To copy the Workbench, one would call
  45.  
  46.         GetScreenData (buffer, sizeof(struct Screen), WBENCHSCREEN, NULL)
  47.  
  48.     If the screen is not open, this call will open it. You can use
  49.     this function for these purposes:
  50.  
  51.     1) Get information about the workbench in order to open a window
  52.        on it (eg. size).
  53.     2) Clone a screen.
  54.  
  55.     INPUTS
  56.     buffer - The data gets copied here
  57.     size - The size of the buffer in bytes
  58.     type - The type of the screen as in OpenWindow().
  59.     screen - Ignored unless type is CUSTOMSCREEN.
  60.  
  61.     RESULT
  62.     TRUE if successful, FALSE if the screen could not be opened.
  63.  
  64.     NOTES
  65.  
  66.     EXAMPLE
  67.  
  68.     BUGS
  69.  
  70.     SEE ALSO
  71.  
  72.     INTERNALS
  73.  
  74.     HISTORY
  75.     29-10-95    digulla automatically created from
  76.                 intuition_lib.fd and clib/intuition_protos.h
  77.  
  78. *****************************************************************************/
  79. {
  80.     AROS_LIBFUNC_INIT
  81.     AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  82.  
  83.     if (type == WBENCHSCREEN)
  84.     screen = GetPrivIBase(IntuitionBase)->WorkBench;
  85.     else if (type != CUSTOMSCREEN) /* TODO */
  86.     screen = NULL;
  87.  
  88.     if (screen)
  89.     CopyMem (screen, buffer, size);
  90.  
  91.     return (screen != NULL);
  92.     AROS_LIBFUNC_EXIT
  93. } /* GetScreenData */
  94.